import java.util.*;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int t = in.nextInt();
        int[] arr = new int[6];
        for (int i = 0; i < t; i++) {
            for (int j = 0; j < 6; j++) {
                arr[j] = in.nextInt();
            }
            Arrays.sort(arr);
            boolean flag = fun(arr);

            if (flag) {
                System.out.println("Yes");
            }else {
                System.out.println("No");
            }
        }
    }
    private static boolean fun(int[] arr) {
        for (int first = 0; first <= 3; first++) {
            for (int second = first + 1; second <= 4; second++) {
                for (int third = second + 1; third <= 5; third++) {
                    int a = 0;
                    boolean flagA = true;
                    int b = 0;
                    boolean flagB = true;
                    int c = 0;
                    boolean flagC = true;
                    for (int j = 0; j <= 5; j++) {
                        if (flagA && j != first && j != second && j != third) {
                            a = j;
                            flagA = false;
                        } else if (flagB && j != first && j != second && j != third) {
                            b = j;
                            flagB = false;
                        } else if (flagC && j != first && j != second && j != third) {
                            c = j;
                            flagC = false;
                            break;
                        }
                    }
                    if (arr[first] + arr[second] > arr[third] && arr[a] + arr[b] > arr[c]) {
                        return true;
                    }
                }
            }
        }
        return false;
    }

}